class Register {
  final String account;
  final String mobilePhone;
  final String userName;
  final String pwd;
  final String? registrationId;
  final String? imId;
  final String? imIdPwd;

  Register({
    required this.account,
    required this.mobilePhone,
    required this.userName,
    required this.pwd,
    this.registrationId,
    this.imId,
    this.imIdPwd,
  });

  factory Register.fromJson(Map<String, dynamic> json) {
    return Register(
      account: json['account'] ?? "",
      mobilePhone: json['mobilePhone'] ?? "",
      userName: json['userName'] ?? "",
      pwd: json['pwd'] ?? "",
      registrationId: json['registrationId'] ?? "",
      imId: json['imId'] ?? "",
      imIdPwd: json['imIdPwd'] ?? "",
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'account': account,
      'mobilePhone': mobilePhone,
      'userName': userName,
      'pwd': pwd,
      'registrationId': registrationId,
      'imId': imId,
      'imIdPwd': imIdPwd,
    };
  }
}
